﻿/******************************************************************************
* File description: syringeCalculator.cpp
* Function: 计算注射器参数，用于动画显示
* Current Version: 1.0.0
* Author: JNN
* Date: 2025-07-01
*  -----
*  Copyright by 博坤生物 .
 *****************************************************************************/

#ifndef SYRINGECALCULATOR_H
#define SYRINGECALCULATOR_H

#include <cmath>
#include "CommonHelper.h"
#include <StaticProperties.h>

class SyringeCalculator
{
public:
    SyringeCalculator();

    static double calStep2MM(int idx, double stepNum);
    static double getSyringeHeightMM(int idx);
    static double getSyringeDiameterMM(int idx);

    static double speedMin2s(int idx, double speedMin);
    static double speedS2min(int idx, double speedS);

    static double getSyringePercentFromInitialPosition(int idx);

    static void   setConsumableName(QString consumableName);

    static void   refreshSyringeParams();


    static QString consumableName;

private:
    // 注射器参数 QVecor<注射器idx, QMap<参数名, 参数值>>
    static QVector<QMap<QString, QString>>   _syringeList;



};

#endif // SYRINGECALCULATOR_H
